<!DOCTYPE html>
<html>
<head>
    <style>
        div
        {
            width:100px;
            height:100px;
            background:red;
            animation:myfirst 5s;

        }

        @keyframes myfirst
        {
            from {background:red;}
            to {background:yellow;}
        }

        @-moz-keyframes myfirst /* Firefox */
        {
            from {background:red;}
            to {background:yellow;}
        }

        @-webkit-keyframes myfirst /* Safari and Chrome */
        {
            from {background:red;}
            to {background:yellow;}
        }

        @-o-keyframes myfirst /* Opera */
        {
            from {background:red;}
            to {background:yellow;}
        }
    </style>
</head>
<body>

<div></div>


</body>
</html>